Component({
    properties: {
        price: {
            type: String,
            observer: function(e) {
                this.setData({
                    price1: e.split(".")[0],
                    price2: e.split(".")[1] || "00"
                });
            }
        },
        select: {
            type: Boolean
        },
        originalPrice: {
            type: String,
            value: 0
        }
    },
    data: {
        price1: 0,
        price2: 0
    },
    methods: {
        tappingAll: function(e) {
            this.triggerEvent("changeAll", {
                select: e.detail.select
            });
        },
        tappingPay: function() {
            this.triggerEvent("pay", {});
        },
        tappingWord: function() {
            this.triggerEvent("changeAll", {
                select: !this.properties.select
            });
        }
    }
});